package com.ihg.hiex.entity.session.before;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.EnumType;
import javax.persistence.Enumerated;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

import com.ihg.hiex.entity.session.Session;
import com.ihg.hiex.entity.session.before.test.Status;
import com.ihg.hiex.entity.session.participator.Type;
import com.ihg.hiex.entity.session.task.SessionTask;

/**
 * 
 * @author dan
 *
 */
@Entity
@Table(name = "session_external_test")
public class SessionExternalTest {
    
    @Id
    @GeneratedValue
    private Long id;
    
    /**
     * 所属session
     */
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private Session session;
    
    /** 所属 session task */
    @ManyToOne(fetch = FetchType.LAZY, optional = false)
    private SessionTask sessionTask;
    
    /** 测试类型 */
    @Enumerated(EnumType.STRING)
    private TestType testType;
    
    /** 参与者类型 */
    @Enumerated(EnumType.STRING)
    private Type type;
    
    /**
     * 参与者ID
     */
    private Long participatorId;
    
    /** 状态 */
    @Enumerated(EnumType.STRING)
    private Status status;
    
    /** report url */
    private String reportUrl;
    
    @Column(name = "is_disabled")
    private boolean disabled;
    
    /**
     * 
     */
    public SessionExternalTest() {
        
    }

    /**
     * @return the id
     */
    public Long getId() {
        return id;
    }

    /**
     * @return the session
     */
    public Session getSession() {
        return session;
    }

    /**
     * @return the sessionTask
     */
    public SessionTask getSessionTask() {
        return sessionTask;
    }

    /**
     * @return the testType
     */
    public TestType getTestType() {
        return testType;
    }

    /**
     * @return the type
     */
    public Type getType() {
        return type;
    }

    /**
     * @return the participatorId
     */
    public Long getParticipatorId() {
        return participatorId;
    }

    /**
     * @return the status
     */
    public Status getStatus() {
        return status;
    }

    /**
     * @return the reportUrl
     */
    public String getReportUrl() {
        return reportUrl;
    }

    /**
     * @return the disabled
     */
    public boolean isDisabled() {
        return disabled;
    }

    /**
     * @param id the id to set
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * @param session the session to set
     */
    public void setSession(Session session) {
        this.session = session;
    }

    /**
     * @param sessionTask the sessionTask to set
     */
    public void setSessionTask(SessionTask sessionTask) {
        this.sessionTask = sessionTask;
    }

    /**
     * @param testType the testType to set
     */
    public void setTestType(TestType testType) {
        this.testType = testType;
    }

    /**
     * @param type the type to set
     */
    public void setType(Type type) {
        this.type = type;
    }

    /**
     * @param participatorId the participatorId to set
     */
    public void setParticipatorId(Long participatorId) {
        this.participatorId = participatorId;
    }

    /**
     * @param status the status to set
     */
    public void setStatus(Status status) {
        this.status = status;
    }

    /**
     * @param reportUrl the reportUrl to set
     */
    public void setReportUrl(String reportUrl) {
        this.reportUrl = reportUrl;
    }

    /**
     * @param disabled the disabled to set
     */
    public void setDisabled(boolean disabled) {
        this.disabled = disabled;
    }

}
